package pers.acp.test.application.test

import io.gitee.zhangbinhub.acp.boot.ftp.server.AcpFtpServerUser
import io.gitee.zhangbinhub.acp.boot.ftp.user.UserFactory
import org.noear.solon.annotation.Component

/**
 * @since JDK 17
 */
@Component("testUserFactory")
class TestUserFactory : UserFactory {
    override fun generateFtpUserList(): List<AcpFtpServerUser> {
        val result: MutableList<AcpFtpServerUser> = java.util.ArrayList()
        val ftpServerUser = AcpFtpServerUser()
        ftpServerUser.username = "ftp"
        ftpServerUser.password = "11"
        ftpServerUser.writePermission = true
        ftpServerUser.maxLoginNumber = 10
        ftpServerUser.maxLoginPerIp = 10
        ftpServerUser.homeDirectory = "/"
        ftpServerUser.isEnableFlag = true
        result.add(ftpServerUser)
        return result
    }
}
